import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/signintask',
  component: Layout,
  redirect: '/signintask/index',
  name: 'signintask',
  meta: {
    title: '签到活动',
    icon: 'material-symbols:event-available-outline-sharp',
  },
  children: [
    {
      path: 'index',
      name: 'signintaskIndex',
      component: () => import('@/views/signintask/index.vue'),
      meta: {
        title: '任务列表',
      },
    },
    {
      path: 'detail',
      name: 'signintaskDetail',
      component: () => import('@/views/signintask/detail.vue'),
      meta: {
        title: '签到活动任务配置',
        menu: false,
        activeMenu: '/signintask/index',
      },
    },
    {
      path: 'invarted',
      name: 'signintaskInvarted',
      component: () => import('@/views/signintask/InvatedList.vue'),
      meta: {
        title: '邀请记录',
      },
    },
    {
      path: 'sentcoupon',
      name: 'signintasksentcoupon',
      component: () => import('@/views/signintask/sentcouponList.vue'),
      meta: {
        title: '发券记录',
      },
    },
  ],
}

export default routes
